package com.zy.annotation;

import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.zy.enums.ElNameEnum;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * @author hanhuafeng
 * @version V1.0
 * @description
 * @date 2023/7/17
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@LiteflowComponent
public @interface RuleCmp {
    /**
     * 对应的参数
     *
     * @return 参数
     */
    Class<?> params() default Object.class;

    /**
     * liteflow组件对应的id
     *
     * @return id
     */
    @AliasFor(annotation = LiteflowComponent.class, attribute = "id")
    String flowCmpId() default "";

    /**
     * liteflow组件类型
     *
     * @return 类型
     */
    ElNameEnum cmpType() default ElNameEnum.COMMON;

    /**
     * 默认展示文本
     */
    String defaultText() default "rule";
}
